package com.xxxx.seckill.Utils;

import org.thymeleaf.util.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @Author: Kong
 * @DateTime: 2022/2/26 14:38
 * @Description: TODO
 */
public class ValidatorUtil {
    private static final Pattern mobile_patter = Pattern.compile("[1]([3-9])[0-9]{9}$");

    public static boolean isMobile(String mobile) {
        if (StringUtils.isEmpty(mobile)) {
            return false;
        }
        Matcher matcher = mobile_patter.matcher(mobile);
        return matcher.matches();
    }
}
